package school.valon.persistence.pojo;

import java.io.Serializable;

import javax.persistence.*;

import java.util.List;


/**
 * The persistent class for the expense_category database table.
 * 
 */
@Entity
@Table(name="expense_category")
@NamedQueries({
@NamedQuery(name="ExpenseCategory.findAll", query="SELECT e FROM ExpenseCategory e"),
@NamedQuery(name="ExpenseCategory.deleteById", query="DELETE FROM ExpenseCategory WHERE expenseCategoryId = :P1")
})
public class ExpenseCategory implements Serializable {

	private static final long serialVersionUID = -3073652124390020581L;

	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(name="expense_category_id")
	private Integer expenseCategoryId;

	@Column(name="expense_category")
	private String expenseCategory;

	//bi-directional many-to-one association to ExpensePayment
	@OneToMany(mappedBy="expenseCategory", fetch=FetchType.LAZY)
	private List<ExpensePayment> expensePayments;

	public Integer getExpenseCategoryId() {
		return this.expenseCategoryId;
	}

	public void setExpenseCategoryId(Integer expenseCategoryId) {
		this.expenseCategoryId = expenseCategoryId;
	}

	public String getExpenseCategory() {
		return this.expenseCategory;
	}

	public void setExpenseCategory(String expenseCategory) {
		this.expenseCategory = expenseCategory;
	}

	public List<ExpensePayment> getExpensePayments() {
		return this.expensePayments;
	}

	public void setExpensePayments(List<ExpensePayment> expensePayments) {
		this.expensePayments = expensePayments;
	}
}